---
- name: Install Node.js on Linux
  ansible.builtin.import_tasks: linux.yml
  when: ansible_os_family == "Debian"

- name: Install Node.js on MacOS
  ansible.builtin.import_tasks: macos.yml
  when: ansible_distribution == "MacOSX"

- name: Install LTS Node.js version
  ansible.builtin.command: volta install node@lts
  changed_when: false
  tags:
    - nodejs
